﻿@*为了@Html.ActionLin*@
@model HomePageViewModel
@{ 
    ViewBag.Title = "首页";
}
<h1>欢迎</h1>

<table>
    @foreach (var employee in Model.Employees)
    {
        <tr>
            <td>@employee.Name</td>

            <td>
                @* HTML Helper ActionLink *@
                @*@Html.ActionLink(employee.Id.ToString(), "Details", new { id = employee.Id })*@
                @*Tag Helper*@
                <a asp-action="Details" 
                   asp-route-id="@employee.Id">Details</a>
                <a asp-controller="Home" 
                   asp-action="Edit"
                   asp-route-id="@employee.Id">Edit</a>
            </td>
        </tr>
    }
</table>

<div>
    <a asp-action="Create">Create</a>
</div>

